
{extend name='index/main'}

{block name='main'}
<div class="layui-layout">

    <fieldset class="layui-elem-field layui-field-title" >
        <legend>查找</legend>
        <blockquote class="layui-elem-quote">
            <form class="layui-form layui-form-pane" action="" method="post" lay-filter="search">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <input type="text" name="title" placeholder="角色名称" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <button class="layui-btn lay-submit">
                                <i class="layui-icon">&#xe615;</i> 搜索
                            </button>
                        </div>
                    </div>
                </div>
            </form>
        </blockquote>
    </fieldset>

    <form class="layui-form layui-form-pane" action="" method="post" lay-filter="list-table">
        <blockquote class="layui-elem-quote layui-quote-nm">
            <button class="layui-btn" lay-submit data-url="{:url('module/pdel')}" data-call-back="table_pdel">
                批量删除
            </button>

            <button class="layui-btn link" data-type="page" data-url="{:url('module/add')}" style="float: right">
                添加
            </button>
        </blockquote>

        <div class="layui-form">
            <table class="layui-table" lay-filter="layui-table"
                   lay-data="{height:300, url:'{:url('module/index')}',method:'post',response:{statusCode:1},page:true,limit:1,limits:[20,30,60,100]}">
                <thead>
                <tr>
                    <th lay-data="{checkbox:true, }" ></th>
                    <th lay-data="{field:'id', width:100 ,align: 'center'}">id</th>
                    <th lay-data="{field:'module_name', width:100 ,align: 'center'}">中文名字</th>
                    <th lay-data="{field:'file_name', width:100 ,align: 'center'}">英文名字</th>
                    <th lay-data="{field:'models_id', width:120 ,align: 'center'}">挂载的模型ids</th>
                    <th lay-data="{field:'status', width:100 ,align: 'center'}">状态</th>
                    <th lay-data="{width:200 ,toolbar: '#actionTpl',fixed:'right'}">操作</th>
                </tr>
                </thead>
            </table>
        </div>


        <blockquote class="layui-elem-quote layui-quote-nm">
            <button class="layui-btn" lay-submit data-url="{:url('module/pdel')}" data-call-back="table_pdel">
                批量删除
            </button>

            <button class="layui-btn link" data-type="page" data-url="{:url('module/add')}" style="float: right">
                添加
            </button>
        </blockquote>
    </form>
</div>

<script type="text/javascript" src="__PLUGIN_PATH__/layui/layui.js"></script>
<script type="text/javascript" src="__PLUGIN_PATH__/lay-extend-module/config.js"></script>
<script>
    layui.use(['table','tableExtend'],function(){
        var table = layui.table
            ,tableExtend = layui.tableExtend;
        table.on('tool(layui-table)',tableExtend.toolhandler);
    })

</script>
{/block}